:root {
  --bg: #0b0b0b;
  --bg-elev: rgba(255,255,255,0.04);
  --text: #f5f5f7;
  --muted: #a1a1a6;
  --primary: #2997ff;
  --border: rgba(255,255,255,0.12);
  --shadow: 0 10px 30px rgba(0,0,0,0.35);
  --radius: 18px;
  --success: #34c759;
  --error: #ff3b30;
}

@media (prefers-color-scheme: light) {
  :root {
    --bg: #ffffff;
    --bg-elev: rgba(0,0,0,0.04);
    --text: #1d1d1f;
    --muted: #6e6e73;
    --primary: #0071e3;
    --border: rgba(0,0,0,0.08);
    --shadow: 0 10px 30px rgba(0,0,0,0.08);
    --success: #28cd41;
    --error: #ff3b30;
  }
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans SC", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  color: var(--text);
  background: radial-gradient(1200px 600px at 80% -10%, rgba(41,151,255,0.25), transparent 50%),
              radial-gradient(900px 500px at -10% 20%, rgba(52,199,89,0.18), transparent 50%),
              var(--bg);
}

/* Top Nav */
.nav {
  position: sticky; top: 0; z-index: 10;
  backdrop-filter: saturate(180%) blur(20px);
  background: color-mix(in srgb, var(--bg), transparent 65%);
  border-bottom: 1px solid var(--border);
}
.nav-inner {
  max-width: 1120px; margin: 0 auto; height: 64px;
  display: flex; align-items: center; gap: 24px; padding: 0 20px;
}
.brand {
  display: inline-flex; align-items: center; gap: 10px;
  text-decoration: none; color: var(--text); font-weight: 600; letter-spacing: .2px;
}
.brand-dot { width: 12px; height: 12px; border-radius: 50%; background: var(--primary); box-shadow: 0 0 20px rgba(41,151,255,.6); }
.brand-text { font-size: 18px; }

.nav-links { display: flex; gap: 14px; margin-left: auto; }
.nav-link {
  color: var(--muted); text-decoration: none; padding: 8px 12px; border-radius: 12px;
  transition: color .2s ease, background .2s ease;
}
.nav-link:hover { color: var(--text); background: var(--bg-elev); }
.nav-link.active { color: var(--text); background: var(--bg-elev); border: 1px solid var(--border); }

.theme-toggle {
  margin-left: 8px; width: 36px; height: 36px; border-radius: 50%;
  border: 1px solid var(--border); background: transparent; color: var(--text);
  display: grid; place-items: center; cursor: pointer;
}

/* Page */
.page { max-width: 1120px; margin: 0 auto; padding: 40px 20px 80px; }

.hero { padding: 24px 0 10px; }
.title { font-size: 44px; line-height: 1.1; margin: 0 0 8px; letter-spacing: -.02em; }
.subtitle { margin: 0; color: var(--muted); font-size: 16px; }

/* 上传功能样式 */
.upload-section {
  margin-bottom: 32px;
}

.upload-description {
  margin: 8px 0 16px;
  color: var(--muted);
  font-size: 14px;
}

.upload-area {
  border: 2px dashed var(--border);
  border-radius: var(--radius);
  padding: 40px 20px;
  text-align: center;
  cursor: pointer;
  transition: all .3s ease;
  background: color-mix(in srgb, var(--bg), white 2%);
}

.upload-area:hover {
  border-color: var(--primary);
  background: color-mix(in srgb, var(--primary), transparent 95%);
}

.upload-area.dragover {
  border-color: var(--primary);
  background: color-mix(in srgb, var(--primary), transparent 90%);
  transform: scale(1.02);
}

.upload-content {
  pointer-events: none;
}

.upload-icon {
  font-size: 48px;
  display: block;
  margin-bottom: 16px;
}

.upload-text {
  margin: 0 0 8px;
  font-size: 16px;
  font-weight: 500;
}

.upload-hint {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
}

/* 上传进度 */
.upload-progress {
  margin-top: 16px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.progress-bar {
  flex: 1;
  height: 6px;
  background: var(--bg-elev);
  border-radius: 3px;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--primary), var(--success));
  width: 0;
  transition: width .3s ease;
}

.progress-text {
  font-size: 14px;
  font-weight: 600;
  color: var(--primary);
  min-width: 40px;
}

/* 上传结果 */
.upload-result {
  margin-top: 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px;
  border-radius: 12px;
  background: color-mix(in srgb, var(--success), transparent 90%);
  border: 1px solid color-mix(in srgb, var(--success), transparent 70%);
}

.upload-result.error {
  background: color-mix(in srgb, var(--error), transparent 90%);
  border: 1px solid color-mix(in srgb, var(--error), transparent 70%);
}

.result-icon {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--success);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: bold;
}

.upload-result.error .result-icon {
  background: var(--error);
}

.result-title {
  margin: 0;
  font-weight: 600;
  font-size: 14px;
}

.result-detail {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 12px;
}

.upload-actions {
  margin-top: 16px;
  display: flex;
  gap: 12px;
}

/* 数据模板 */
.data-templates {
  border-top: 1px solid var(--border);
  padding-top: 24px;
}

.template-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 16px;
  margin-top: 16px;
}

.template-card {
  padding: 20px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: color-mix(in srgb, var(--bg), white 3%);
}

.template-card h4 {
  margin: 0 0 8px;
  font-size: 16px;
  font-weight: 600;
}

.template-card p {
  margin: 0 0 16px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.4;
}

.template-btn {
  padding: 8px 16px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: transparent;
  color: var(--primary);
  font-size: 14px;
  cursor: pointer;
  transition: all .2s ease;
}

.template-btn:hover {
  background: color-mix(in srgb, var(--primary), transparent 90%);
}

/* 设置行 */
.setting-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 0;
  border-bottom: 1px solid var(--border);
}

.setting-row:last-child {
  border-bottom: none;
}

/* 时间筛选器 */
.filter-bar {
  margin: 32px 0 24px;
  padding: 20px;
  background: color-mix(in srgb, var(--bg), white 6%);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  backdrop-filter: blur(10px);
}

.filter-group {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

.filter-label {
  color: var(--muted);
  font-weight: 500;
  font-size: 14px;
}

.date-range {
  display: flex;
  align-items: center;
  gap: 8px;
}

.date-input {
  padding: 8px 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: color-mix(in srgb, var(--bg), white 6%);
  color: var(--text);
  font-size: 14px;
}

.date-separator {
  color: var(--muted);
  font-size: 14px;
}

.quick-filters {
  display: flex;
  gap: 6px;
}

.quick-btn {
  padding: 6px 12px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  font-size: 14px;
  cursor: pointer;
  transition: all .2s ease;
}

.quick-btn:hover {
  color: var(--text);
  background: var(--bg-elev);
}

.quick-btn.active {
  color: var(--text);
  background: var(--bg-elev);
  border-color: var(--primary);
}

.filter-apply {
  margin-top: 0;
  padding: 8px 16px;
  font-size: 14px;
}

/* 数据段落 */
.data-section {
  margin: 36px 0;
}

.section-header {
  margin-bottom: 20px;
}

.section-header h2 {
  margin: 0;
  font-size: 28px;
  font-weight: 700;
  letter-spacing: -.02em;
}

/* 指标网格 */
.metrics-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 18px;
  margin-bottom: 28px;
}

.metric-card {
  background: color-mix(in srgb, var(--bg), white 6%);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 20px;
  backdrop-filter: blur(10px);
}

.metric-card h3 {
  margin: 0 0 12px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 600;
}

.metric-value {
  font-size: 32px;
  font-weight: 700;
  letter-spacing: .3px;
  color: var(--text);
}

/* 表格容器 */
.table-container {
  margin: 28px 0;
  background: color-mix(in srgb, var(--bg), white 6%);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  backdrop-filter: blur(10px);
}

.table-header {
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
  background: color-mix(in srgb, var(--bg), white 3%);
}

.table-header h3 {
  margin: 0;
  font-size: 18px;
  font-weight: 600;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
}

.data-table th,
.data-table td {
  padding: 12px 20px;
  text-align: left;
  border-bottom: 1px solid var(--border);
}

.data-table th {
  background: color-mix(in srgb, var(--bg), white 3%);
  color: var(--muted);
  font-weight: 600;
  font-size: 14px;
}

.data-table td {
  color: var(--text);
  font-size: 14px;
}

.data-table tbody tr:hover {
  background: color-mix(in srgb, var(--bg), white 3%);
}

.data-table tbody tr:last-child td {
  border-bottom: none;
}

/* 图表容器 */
.chart-container {
  margin: 28px 0;
  background: color-mix(in srgb, var(--bg), white 6%);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  backdrop-filter: blur(10px);
}

.chart-header {
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
  background: color-mix(in srgb, var(--bg), white 3%);
}

.chart-header h3 {
  margin: 0;
  font-size: 18px;
  font-weight: 600;
}

/* 占位内容 */
.placeholder-section {
  background: color-mix(in srgb, var(--bg), white 6%);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 60px 20px;
  text-align: center;
  backdrop-filter: blur(10px);
}

.placeholder-content {
  color: var(--muted);
}

.placeholder-icon {
  font-size: 48px;
  display: block;
  margin-bottom: 16px;
}

.placeholder-content p {
  margin: 0;
  font-size: 16px;
}

/* Cards & Panels */
.grid {
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: 18px; margin-top: 24px;
}
@media (max-width: 900px) {
  .grid { grid-template-columns: 1fr; }
}

.card {
  background: color-mix(in srgb, var(--bg), white 6%);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 20px;
  backdrop-filter: blur(10px);
}

.kpi h3 { margin: 2px 0 10px; color: var(--muted); font-weight: 600; }
.kpi-value { font-size: 28px; font-weight: 700; letter-spacing: .3px; }
.kpi-trend { margin-top: 8px; font-size: 14px; color: var(--muted); }
.kpi-trend.up::before { content: '↑ '; color: #34c759; }
.kpi-trend.down::before { content: '↓ '; color: #ff3b30; }

.panel { margin-top: 28px; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--border); }
.panel-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 16px; background: color-mix(in srgb, var(--bg), white 6%); border-bottom: 1px solid var(--border);
}
.panel-header h2 { margin: 0; font-size: 18px; }
.panel-body { padding: 16px; }

.segmented { display: inline-flex; gap: 6px; }
.seg-btn {
  border: 1px solid var(--border); background: transparent; color: var(--text);
  padding: 8px 12px; border-radius: 999px; cursor: pointer;
}
.seg-active { background: var(--bg-elev); }

.chart-placeholder {
  height: 220px; border-radius: 14px; border: 1px dashed var(--border);
  display: grid; place-items: center; color: var(--muted);
}

.form .label { display: block; margin: 8px 0 6px; color: var(--muted); }
.input, .textarea, select.input {
  width: 100%; padding: 10px 12px; border-radius: 12px; border: 1px solid var(--border);
  background: color-mix(in srgb, var(--bg), white 6%); color: var(--text);
}
.textarea { resize: vertical; font-family: inherit; }

.action {
  margin-top: 14px; padding: 10px 16px; border-radius: 12px; border: 1px solid var(--border);
  color: #fff; background: linear-gradient(180deg, #2997ff, #0071e3);
  box-shadow: 0 8px 20px rgba(41,151,255,.35); cursor: pointer;
}
.action.subtle {
  background: transparent; color: var(--text);
}

/* Toggle Switch */
.switch { position: relative; display: inline-block; width: 46px; height: 26px; }
.switch input { display: none; }
.slider {
  position: absolute; inset: 0; background: var(--bg-elev); border: 1px solid var(--border); border-radius: 999px; transition: .2s;
}
.slider:before {
  content: ""; position: absolute; height: 20px; width: 20px; left: 3px; top: 3px; background: var(--text); border-radius: 50%; transition: .2s;
}
input:checked + .slider { background: color-mix(in srgb, var(--primary), transparent 80%); }
input:checked + .slider:before { transform: translateX(20px); }

/* Report */
.minor-title { margin: 0 0 10px; color: var(--muted); }
.report { min-height: 120px; white-space: pre-wrap; }

/* Footer */
.footer { border-top: 1px solid var(--border); margin-top: 40px; }
.footer-inner { max-width: 1120px; margin: 0 auto; padding: 18px 20px; color: var(--muted); display: flex; align-items: center; gap: 10px; }
.footer .dot { opacity: .6; }

/* 响应式设计 */
@media (max-width: 768px) {
  .filter-group {
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
  }
  
  .date-range {
    flex-direction: column;
    gap: 8px;
  }
  
  .metrics-grid {
    grid-template-columns: 1fr;
  }
  
  .data-table {
    font-size: 12px;
  }
  
  .data-table th,
  .data-table td {
    padding: 8px 12px;
  }
  
  .template-grid {
    grid-template-columns: 1fr;
  }
  
  .upload-area {
    padding: 30px 15px;
  }
  
  .upload-actions {
    flex-direction: column;
  }

  .metric-card {
    margin-bottom: 1rem;
  }
  
  .metric-card h2 {
    font-size: 2rem;
  }
  
  .metric-card h5 {
    font-size: 0.9rem;
  }
  
  .row > [class*="col-"] {
    margin-bottom: 1rem;
  }
}

@media (max-width: 576px) {
  .metric-card h2 {
    font-size: 1.5rem;
  }
  
  .card-body {
    padding: 1rem;
  }
}

/* 缺陷数据展示样式 */
.metric-card {
    border: none;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    transition: transform 0.2s;
}

.metric-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
}

.metric-card .card-body {
    padding: 1.5rem;
}

.metric-card h2 {
    font-size: 2.5rem;
    font-weight: bold;
    margin: 0.5rem 0;
}

.metric-card h5 {
    font-size: 1rem;
    color: #6c757d;
    margin-bottom: 0.5rem;
}

.card {
    margin-bottom: 1.5rem;
}

.card-header h5 {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 600;
}

.table-sm th,
.table-sm td {
    padding: 0.5rem;
    font-size: 0.9rem;
}

.defect-item {
    border: 1px solid #dee2e6;
    border-radius: 0.375rem;
    padding: 0.75rem;
    margin-bottom: 0.5rem;
}

.defect-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
}

.defect-id {
    font-weight: bold;
    color: #007bff;
}

.defect-title {
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
}

.defect-meta {
    font-size: 0.8rem;
    color: #6c757d;
}

.defect-meta span {
    margin-right: 0.75rem;
}

.badge-urgent { background-color: #dc3545; }
.badge-high { background-color: #fd7e14; }
.badge-medium { background-color: #0dcaf0; }
.badge-low { background-color: #198754; }
.kpi-trend.up::before { content: '↑ '; color: #34c759; }
.kpi-trend.down::before { content: '↓ '; color: #ff3b30; }

.panel { margin-top: 28px; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--border); }
.panel-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 16px; background: color-mix(in srgb, var(--bg), white 6%); border-bottom: 1px solid var(--border);
}
.panel-header h2 { margin: 0; font-size: 18px; }
.panel-body { padding: 16px; }

.segmented { display: inline-flex; gap: 6px; }
.seg-btn {
  border: 1px solid var(--border); background: transparent; color: var(--text);
  padding: 8px 12px; border-radius: 999px; cursor: pointer;
}
.seg-active { background: var(--bg-elev); }

.chart-placeholder {
  height: 220px; border-radius: 14px; border: 1px dashed var(--border);
  display: grid; place-items: center; color: var(--muted);
}

.form .label { display: block; margin: 8px 0 6px; color: var(--muted); }
.input, .textarea, select.input {
  width: 100%; padding: 10px 12px; border-radius: 12px; border: 1px solid var(--border);
  background: color-mix(in srgb, var(--bg), white 6%); color: var(--text);
}
.textarea { resize: vertical; font-family: inherit; }

.action {
  margin-top: 14px; padding: 10px 16px; border-radius: 12px; border: 1px solid var(--border);
  color: #fff; background: linear-gradient(180deg, #2997ff, #0071e3);
  box-shadow: 0 8px 20px rgba(41,151,255,.35); cursor: pointer;
}
.action.subtle {
  background: transparent; color: var(--text);
}

/* Toggle Switch */
.switch { position: relative; display: inline-block; width: 46px; height: 26px; }
.switch input { display: none; }
.slider {
  position: absolute; inset: 0; background: var(--bg-elev); border: 1px solid var(--border); border-radius: 999px; transition: .2s;
}
.slider:before {
  content: ""; position: absolute; height: 20px; width: 20px; left: 3px; top: 3px; background: var(--text); border-radius: 50%; transition: .2s;
}
input:checked + .slider { background: color-mix(in srgb, var(--primary), transparent 80%); }
input:checked + .slider:before { transform: translateX(20px); }

/* Report */
.minor-title { margin: 0 0 10px; color: var(--muted); }
.report { min-height: 120px; white-space: pre-wrap; }

/* Footer */
.footer { border-top: 1px solid var(--border); margin-top: 40px; }
.footer-inner { max-width: 1120px; margin: 0 auto; padding: 18px 20px; color: var(--muted); display: flex; align-items: center; gap: 10px; }
.footer .dot { opacity: .6; }

/* 响应式设计 */
@media (max-width: 768px) {
  .filter-group {
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
  }
  
  .date-range {
    flex-direction: column;
    gap: 8px;
  }
  
  .metrics-grid {
    grid-template-columns: 1fr;
  }
  
  .data-table {
    font-size: 12px;
  }
  
  .data-table th,
  .data-table td {
    padding: 8px 12px;
  }
  
  .template-grid {
    grid-template-columns: 1fr;
  }
  
  .upload-area {
    padding: 30px 15px;
  }
  
  .upload-actions {
    flex-direction: column;
  }
}
.kpi-trend.up::before { content: '↑ '; color: #34c759; }
.kpi-trend.down::before { content: '↓ '; color: #ff3b30; }

.panel { margin-top: 28px; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--border); }
.panel-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 16px; background: color-mix(in srgb, var(--bg), white 6%); border-bottom: 1px solid var(--border);
}
.panel-header h2 { margin: 0; font-size: 18px; }
.panel-body { padding: 16px; }

.segmented { display: inline-flex; gap: 6px; }
.seg-btn {
  border: 1px solid var(--border); background: transparent; color: var(--text);
  padding: 8px 12px; border-radius: 999px; cursor: pointer;
}
.seg-active { background: var(--bg-elev); }

.chart-placeholder {
  height: 220px; border-radius: 14px; border: 1px dashed var(--border);
  display: grid; place-items: center; color: var(--muted);
}

.form .label { display: block; margin: 8px 0 6px; color: var(--muted); }
.input, .textarea, select.input {
  width: 100%; padding: 10px 12px; border-radius: 12px; border: 1px solid var(--border);
  background: color-mix(in srgb, var(--bg), white 6%); color: var(--text);
}
.textarea { resize: vertical; font-family: inherit; }

.action {
  margin-top: 14px; padding: 10px 16px; border-radius: 12px; border: 1px solid var(--border);
  color: #fff; background: linear-gradient(180deg, #2997ff, #0071e3);
  box-shadow: 0 8px 20px rgba(41,151,255,.35); cursor: pointer;
}
.action.subtle {
  background: transparent; color: var(--text);
}

/* Toggle Switch */
.switch { position: relative; display: inline-block; width: 46px; height: 26px; }
.switch input { display: none; }
.slider {
  position: absolute; inset: 0; background: var(--bg-elev); border: 1px solid var(--border); border-radius: 999px; transition: .2s;
}
.slider:before {
  content: ""; position: absolute; height: 20px; width: 20px; left: 3px; top: 3px; background: var(--text); border-radius: 50%; transition: .2s;
}
input:checked + .slider { background: color-mix(in srgb, var(--primary), transparent 80%); }
input:checked + .slider:before { transform: translateX(20px); }

/* Report */
.minor-title { margin: 0 0 10px; color: var(--muted); }
.report { min-height: 120px; white-space: pre-wrap; }

/* Footer */
.footer { border-top: 1px solid var(--border); margin-top: 40px; }
.footer-inner { max-width: 1120px; margin: 0 auto; padding: 18px 20px; color: var(--muted); display: flex; align-items: center; gap: 10px; }
.footer .dot { opacity: .6; }

/* 响应式设计 */
@media (max-width: 768px) {
  .filter-group {
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
  }
  
  .date-range {
    flex-direction: column;
    gap: 8px;
  }
  
  .metrics-grid {
    grid-template-columns: 1fr;
  }
  
  .data-table {
    font-size: 12px;
  }
  
  .data-table th,
  .data-table td {
    padding: 8px 12px;
  }
  
  .template-grid {
    grid-template-columns: 1fr;
  }
  
  .upload-area {
    padding: 30px 15px;
  }
  
  .upload-actions {
    flex-direction: column;
  }
}
.kpi-trend.up::before { content: '↑ '; color: #34c759; }
.kpi-trend.down::before { content: '↓ '; color: #ff3b30; }

.panel { margin-top: 28px; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--border); }
.panel-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 16px; background: color-mix(in srgb, var(--bg), white 6%); border-bottom: 1px solid var(--border);
}
.panel-header h2 { margin: 0; font-size: 18px; }
.panel-body { padding: 16px; }

.segmented { display: inline-flex; gap: 6px; }
.seg-btn {
  border: 1px solid var(--border); background: transparent; color: var(--text);
  padding: 8px 12px; border-radius: 999px; cursor: pointer;
}
.seg-active { background: var(--bg-elev); }

.chart-placeholder {
  height: 220px; border-radius: 14px; border: 1px dashed var(--border);
  display: grid; place-items: center; color: var(--muted);
}

.form .label { display: block; margin: 8px 0 6px; color: var(--muted); }
.input, .textarea, select.input {
  width: 100%; padding: 10px 12px; border-radius: 12px; border: 1px solid var(--border);
  background: color-mix(in srgb, var(--bg), white 6%); color: var(--text);
}
.textarea { resize: vertical; font-family: inherit; }

.action {
  margin-top: 14px; padding: 10px 16px; border-radius: 12px; border: 1px solid var(--border);
  color: #fff; background: linear-gradient(180deg, #2997ff, #0071e3);
  box-shadow: 0 8px 20px rgba(41,151,255,.35); cursor: pointer;
}
.action.subtle {
  background: transparent; color: var(--text);
}

/* Toggle Switch */
.switch { position: relative; display: inline-block; width: 46px; height: 26px; }
.switch input { display: none; }
.slider {
  position: absolute; inset: 0; background: var(--bg-elev); border: 1px solid var(--border); border-radius: 999px; transition: .2s;
}
.slider:before {
  content: ""; position: absolute; height: 20px; width: 20px; left: 3px; top: 3px; background: var(--text); border-radius: 50%; transition: .2s;
}
input:checked + .slider { background: color-mix(in srgb, var(--primary), transparent 80%); }
input:checked + .slider:before { transform: translateX(20px); }

/* Report */
.minor-title { margin: 0 0 10px; color: var(--muted); }
.report { min-height: 120px; white-space: pre-wrap; }

/* Footer */
.footer { border-top: 1px solid var(--border); margin-top: 40px; }
.footer-inner { max-width: 1120px; margin: 0 auto; padding: 18px 20px; color: var(--muted); display: flex; align-items: center; gap: 10px; }
.footer .dot { opacity: .6; }

/* 响应式设计 */
@media (max-width: 768px) {
  .filter-group {
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
  }
  
  .date-range {
    flex-direction: column;
    gap: 8px;
  }
  
  .metrics-grid {
    grid-template-columns: 1fr;
  }
  
  .data-table {
    font-size: 12px;
  }
  
  .data-table th,
  .data-table td {
    padding: 8px 12px;
  }
  
  .template-grid {
    grid-template-columns: 1fr;
  }
  
  .upload-area {
    padding: 30px 15px;
  }
  
  .upload-actions {
    flex-direction: column;
  }
}
.kpi-trend.up::before { content: '↑ '; color: #34c759; }
.kpi-trend.down::before { content: '↓ '; color: #ff3b30; }

.panel { margin-top: 28px; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--border); }
.panel-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 16px; background: color-mix(in srgb, var(--bg), white 6%); border-bottom: 1px solid var(--border);
}
.panel-header h2 { margin: 0; font-size: 18px; }
.panel-body { padding: 16px; }

.segmented { display: inline-flex; gap: 6px; }
.seg-btn {
  border: 1px solid var(--border); background: transparent; color: var(--text);
  padding: 8px 12px; border-radius: 999px; cursor: pointer;
}
.seg-active { background: var(--bg-elev); }

.chart-placeholder {
  height: 220px; border-radius: 14px; border: 1px dashed var(--border);
  display: grid; place-items: center; color: var(--muted);
}

.form .label { display: block; margin: 8px 0 6px; color: var(--muted); }
.input, .textarea, select.input {
  width: 100%; padding: 10px 12px; border-radius: 12px; border: 1px solid var(--border);
  background: color-mix(in srgb, var(--bg), white 6%); color: var(--text);
}
.textarea { resize: vertical; font-family: inherit; }

.action {
  margin-top: 14px; padding: 10px 16px; border-radius: 12px; border: 1px solid var(--border);
  color: #fff; background: linear-gradient(180deg, #2997ff, #0071e3);
  box-shadow: 0 8px 20px rgba(41,151,255,.35); cursor: pointer;
}
.action.subtle {
  background: transparent; color: var(--text);
}

/* Toggle Switch */
.switch { position: relative; display: inline-block; width: 46px; height: 26px; }
.switch input { display: none; }
.slider {
  position: absolute; inset: 0; background: var(--bg-elev); border: 1px solid var(--border); border-radius: 999px; transition: .2s;
}
.slider:before {
  content: ""; position: absolute; height: 20px; width: 20px; left: 3px; top: 3px; background: var(--text); border-radius: 50%; transition: .2s;
}
input:checked + .slider { background: color-mix(in srgb, var(--primary), transparent 80%); }
input:checked + .slider:before { transform: translateX(20px); }

/* Report */
.minor-title { margin: 0 0 10px; color: var(--muted); }
.report { min-height: 120px; white-space: pre-wrap; }

/* Footer */
.footer { border-top: 1px solid var(--border); margin-top: 40px; }
.footer-inner { max-width: 1120px; margin: 0 auto; padding: 18px 20px; color: var(--muted); display: flex; align-items: center; gap: 10px; }
.footer .dot { opacity: .6; }

/* 响应式设计 */
@media (max-width: 768px) {
  .filter-group {
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
  }
  
  .date-range {
    flex-direction: column;
    gap: 8px;
  }
  
  .metrics-grid {
    grid-template-columns: 1fr;
  }
  
  .data-table {
    font-size: 12px;
  }
  
  .data-table th,
  .data-table td {
    padding: 8px 12px;
  }
  
  .template-grid {
    grid-template-columns: 1fr;
  }
  
  .upload-area {
    padding: 30px 15px;
  }
  
  .upload-actions {
    flex-direction: column;
  }
}
.kpi-trend.up::before { content: '↑ '; color: #34c759; }
.kpi-trend.down::before { content: '↓ '; color: #ff3b30; }

.panel { margin-top: 28px; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--border); }
.panel-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 16px; background: color-mix(in srgb, var(--bg), white 6%); border-bottom: 1px solid var(--border);
}
.panel-header h2 { margin: 0; font-size: 18px; }
.panel-body { padding: 16px; }

.segmented { display: inline-flex; gap: 6px; }
.seg-btn {
  border: 1px solid var(--border); background: transparent; color: var(--text);
  padding: 8px 12px; border-radius: 999px; cursor: pointer;
}
.seg-active { background: var(--bg-elev); }

.chart-placeholder {
  height: 220px; border-radius: 14px; border: 1px dashed var(--border);
  display: grid; place-items: center; color: var(--muted);
}

.form .label { display: block; margin: 8px 0 6px; color: var(--muted); }
.input, .textarea, select.input {
  width: 100%; padding: 10px 12px; border-radius: 12px; border: 1px solid var(--border);
  background: color-mix(in srgb, var(--bg), white 6%); color: var(--text);
}
.textarea { resize: vertical; font-family: inherit; }

.action {
  margin-top: 14px; padding: 10px 16px; border-radius: 12px; border: 1px solid var(--border);
  color: #fff; background: linear-gradient(180deg, #2997ff, #0071e3);
  box-shadow: 0 8px 20px rgba(41,151,255,.35); cursor: pointer;
}
.action.subtle {
  background: transparent; color: var(--text);
}

/* Toggle Switch */
.switch { position: relative; display: inline-block; width: 46px; height: 26px; }
.switch input { display: none; }
.slider {
  position: absolute; inset: 0; background: var(--bg-elev); border: 1px solid var(--border); border-radius: 999px; transition: .2s;
}
.slider:before {
  content: ""; position: absolute; height: 20px; width: 20px; left: 3px; top: 3px; background: var(--text); border-radius: 50%; transition: .2s;
}
input:checked + .slider { background: color-mix(in srgb, var(--primary), transparent 80%); }
input:checked + .slider:before { transform: translateX(20px); }

/* Report */
.minor-title { margin: 0 0 10px; color: var(--muted); }
.report { min-height: 120px; white-space: pre-wrap; }

/* Footer */
.footer { border-top: 1px solid var(--border); margin-top: 40px; }
.footer-inner { max-width: 1120px; margin: 0 auto; padding: 18px 20px; color: var(--muted); display: flex; align-items: center; gap: 10px; }
.footer .dot { opacity: .6; }

/* 响应式设计 */
@media (max-width: 768px) {
  .filter-group {
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
  }
  
  .date-range {
    flex-direction: column;
    gap: 8px;
  }
  
  .metrics-grid {
    grid-template-columns: 1fr;
  }
  
  .data-table {
    font-size: 12px;
  }
  
  .data-table th,
  .data-table td {
    padding: 8px 12px;
  }
  
  .template-grid {
    grid-template-columns: 1fr;
  }
  
  .upload-area {
    padding: 30px 15px;
  }
  
  .upload-actions {
    flex-direction: column;
  }
}
.kpi-trend.up::before { content: '↑ '; color: #34c759; }
.kpi-trend.down::before { content: '↓ '; color: #ff3b30; }

.panel { margin-top: 28px; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--border); }
.panel-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 16px; background: color-mix(in srgb, var(--bg), white 6%); border-bottom: 1px solid var(--border);
}
.panel-header h2 { margin: 0; font-size: 18px; }
.panel-body { padding: 16px; }

.segmented { display: inline-flex; gap: 6px; }
.seg-btn {
  border: 1px solid var(--border); background: transparent; color: var(--text);
  padding: 8px 12px; border-radius: 999px; cursor: pointer;
}
.seg-active { background: var(--bg-elev); }

.chart-placeholder {
  height: 220px; border-radius: 14px; border: 1px dashed var(--border);
  display: grid; place-items: center; color: var(--muted);
}

.form .label { display: block; margin: 8px 0 6px; color: var(--muted); }
.input, .textarea, select.input {
  width: 100%; padding: 10px 12px; border-radius: 12px; border: 1px solid var(--border);
  background: color-mix(in srgb, var(--bg), white 6%); color: var(--text);
}
.textarea { resize: vertical; font-family: inherit; }

.action {
  margin-top: 14px; padding: 10px 16px; border-radius: 12px; border: 1px solid var(--border);
  color: #fff; background: linear-gradient(180deg, #2997ff, #0071e3);
  box-shadow: 0 8px 20px rgba(41,151,255,.35); cursor: pointer;
}
.action.subtle {
  background: transparent; color: var(--text);
}

/* Toggle Switch */
.switch { position: relative; display: inline-block; width: 46px; height: 26px; }
.switch input { display: none; }
.slider {
  position: absolute; inset: 0; background: var(--bg-elev); border: 1px solid var(--border); border-radius: 999px; transition: .2s;
}
.slider:before {
  content: ""; position: absolute; height: 20px; width: 20px; left: 3px; top: 3px; background: var(--text); border-radius: 50%; transition: .2s;
}
input:checked + .slider { background: color-mix(in srgb, var(--primary), transparent 80%); }
input:checked + .slider:before { transform: translateX(20px); }

/* Report */
.minor-title { margin: 0 0 10px; color: var(--muted); }
.report { min-height: 120px; white-space: pre-wrap; }

/* Footer */
.footer { border-top: 1px solid var(--border); margin-top: 40px; }
.footer-inner { max-width: 1120px; margin: 0 auto; padding: 18px 20px; color: var(--muted); display: flex; align-items: center; gap: 10px; }
.footer .dot { opacity: .6; }

/* 响应式设计 */
@media (max-width: 768px) {
  .filter-group {
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
  }
  
  .date-range {
    flex-direction: column;
    gap: 8px;
  }
  
  .metrics-grid {
    grid-template-columns: 1fr;
  }
  
  .data-table {
    font-size: 12px;
  }
  
  .data-table th,
  .data-table td {
    padding: 8px 12px;
  }
  
  .template-grid {
    grid-template-columns: 1fr;
  }
  
  .upload-area {
    padding: 30px 15px;
  }
  
  .upload-actions {
    flex-direction: column;
  }
}
.kpi-trend.up::before { content: '↑ '; color: #34c759; }
.kpi-trend.down::before { content: '↓ '; color: #ff3b30; }

.panel { margin-top: 28px; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--border); }
.panel-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 16px; background: color-mix(in srgb, var(--bg), white 6%); border-bottom: 1px solid var(--border);
}
.panel-header h2 { margin: 0; font-size: 18px; }
.panel-body { padding: 16px; }

.segmented { display: inline-flex; gap: 6px; }
.seg-btn {
  border: 1px solid var(--border); background: transparent; color: var(--text);
  padding: 8px 12px; border-radius: 999px; cursor: pointer;
}
.seg-active { background: var(--bg-elev); }

.chart-placeholder {
  height: 220px; border-radius: 14px; border: 1px dashed var(--border);
  display: grid; place-items: center; color: var(--muted);
}

.form .label { display: block; margin: 8px 0 6px; color: var(--muted); }
.input, .textarea, select.input {
  width: 100%; padding: 10px 12px; border-radius: 12px; border: 1px solid var(--border);
  background: color-mix(in srgb, var(--bg), white 6%); color: var(--text);
}
.textarea { resize: vertical; font-family: inherit; }

.action {
  margin-top: 14px; padding: 10px 16px; border-radius: 12px; border: 1px solid var(--border);
  color: #fff; background: linear-gradient(180deg, #2997ff, #0071e3);
  box-shadow: 0 8px 20px rgba(41,151,255,.35); cursor: pointer;
}
.action.subtle {
  background: transparent; color: var(--text);
}

/* Toggle Switch */
.switch { position: relative; display: inline-block; width: 46px; height: 26px; }
.switch input { display: none; }
.slider {
  position: absolute; inset: 0; background: var(--bg-elev); border: 1px solid var(--border); border-radius: 999px; transition: .2s;
}
.slider:before {
  content: ""; position: absolute; height: 20px; width: 20px; left: 3px; top: 3px; background: var(--text); border-radius: 50%; transition: .2s;
}
input:checked + .slider { background: color-mix(in srgb, var(--primary), transparent 80%); }
input:checked + .slider:before { transform: translateX(20px); }

/* Report */
.minor-title { margin: 0 0 10px; color: var(--muted); }
.report { min-height: 120px; white-space: pre-wrap; }

/* Footer */
.footer { border-top: 1px solid var(--border); margin-top: 40px; }
.footer-inner { max-width: 1120px; margin: 0 auto; padding: 18px 20px; color: var(--muted); display: flex; align-items: center; gap: 10px; }
.footer .dot { opacity: .6; }

/* 响应式设计 */
@media (max-width: 768px) {
  .filter-group {
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
  }
  
  .date-range {
    flex-direction: column;
    gap: 8px;
  }
  
  .metrics-grid {
    grid-template-columns: 1fr;
  }
  
  .data-table {
    font-size: 12px;
  }
  
  .data-table th,
  .data-table td {
    padding: 8px 12px;
  }
  
  .template-grid {
    grid-template-columns: 1fr;
  }
  
  .upload-area {
    padding: 30px 15px;
  }
  
  .upload-actions {
    flex-direction: column;
  }
}
.kpi-trend.up::before { content: '↑ '; color: #34c759; }
.kpi-trend.down::before { content: '↓ '; color: #ff3b30; }

.panel { margin-top: 28px; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--border); }
.panel-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 16px; background: color-mix(in srgb, var(--bg), white 6%); border-bottom: 1px solid var(--border);
}
.panel-header h2 { margin: 0; font-size: 18px; }
.panel-body { padding: 16px; }

.segmented { display: inline-flex; gap: 6px; }
.seg-btn {
  border: 1px solid var(--border); background: transparent; color: var(--text);
  padding: 8px 12px; border-radius: 999px; cursor: pointer;
}
.seg-active { background: var(--bg-elev); }

.chart-placeholder {
  height: 220px; border-radius: 14px; border: 1px dashed var(--border);
  display: grid; place-items: center; color: var(--muted);
}

.form .label { display: block; margin: 8px 0 6px; color: var(--muted); }
.input, .textarea, select.input {
  width: 100%; padding: 10px 12px; border-radius: 12px; border: 1px solid var(--border);
  background: color-mix(in srgb, var(--bg), white 6%); color: var(--text);
}
.textarea { resize: vertical; font-family: inherit; }

.action {
  margin-top: 14px; padding: 10px 16px; border-radius: 12px; border: 1px solid var(--border);
  color: #fff; background: linear-gradient(180deg, #2997ff, #0071e3);
  box-shadow: 0 8px 20px rgba(41,151,255,.35); cursor: pointer;
}
.action.subtle {
  background: transparent; color: var(--text);
}

/* Toggle Switch */
.switch { position: relative; display: inline-block; width: 46px; height: 26px; }
.switch input { display: none; }
.slider {
  position: absolute; inset: 0; background: var(--bg-elev); border: 1px solid var(--border); border-radius: 999px; transition: .2s;
}
.slider:before {
  content: ""; position: absolute; height: 20px; width: 20px; left: 3px; top: 3px; background: var(--text); border-radius: 50%; transition: .2s;
}
input:checked + .slider { background: color-mix(in srgb, var(--primary), transparent 80%); }
input:checked + .slider:before { transform: translateX(20px); }

/* Report */
.minor-title { margin: 0 0 10px; color: var(--muted); }
.report { min-height: 120px; white-space: pre-wrap; }

/* Footer */
.footer { border-top: 1px solid var(--border); margin-top: 40px; }
.footer-inner { max-width: 1120px; margin: 0 auto; padding: 18px 20px; color: var(--muted); display: flex; align-items: center; gap: 10px; }
.footer .dot { opacity: .6; }

/* 响应式设计 */
@media (max-width: 768px) {
  .filter-group {
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
  }
  
  .date-range {
    flex-direction: column;
    gap: 8px;
  }
  
  .metrics-grid {
    grid-template-columns: 1fr;
  }
  
  .data-table {
    font-size: 12px;
  }
  
  .data-table th,
  .data-table td {
    padding: 8px 12px;
  }
  
  .template-grid {
    grid-template-columns: 1fr;
  }
  
  .upload-area {
    padding: 30px 15px;
  }
  
  .upload-actions {
    flex-direction: column;
  }
}
.kpi-trend.up::before { content: '↑ '; color: #34c759; }
.kpi-trend.down::before { content: '↓ '; color: #ff3b30; }

.panel { margin-top: 28px; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--border); }
.panel-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 16px; background: color-mix(in srgb, var(--bg), white 6%); border-bottom: 1px solid var(--border);
}
.panel-header h2 { margin: 0; font-size: 18px; }
.panel-body { padding: 16px; }

.segmented { display: inline-flex; gap: 6px; }
.seg-btn {
  border: 1px solid var(--border); background: transparent; color: var(--text);
  padding: 8px 12px; border-radius: 999px; cursor: pointer;
}
.seg-active { background: var(--bg-elev); }

.chart-placeholder {
  height: 220px; border-radius: 14px; border: 1px dashed var(--border);
  display: grid; place-items: center; color: var(--muted);
}

.form .label { display: block; margin: 8px 0 6px; color: var(--muted); }
.input, .textarea, select.input {
  width: 100%; padding: 10px 12px; border-radius: 12px; border: 1px solid var(--border);
  background: color-mix(in srgb, var(--bg), white 6%); color: var(--text);
}
.textarea { resize: vertical; font-family: inherit; }

.action {
  margin-top: 14px; padding: 10px 16px; border-radius: 12px; border: 1px solid var(--border);
  color: #fff; background: linear-gradient(180deg, #2997ff, #0071e3);
  box-shadow: 0 8px 20px rgba(41,151,255,.35); cursor: pointer;
}
.action.subtle {
  background: transparent; color: var(--text);
}

/* Toggle Switch */
.switch { position: relative; display: inline-block; width: 46px; height: 26px; }
.switch input { display: none; }
.slider {
  position: absolute; inset: 0; background: var(--bg-elev); border: 1px solid var(--border); border-radius: 999px; transition: .2s;
}
.slider:before {
  content: ""; position: absolute; height: 20px; width: 20px; left: 3px; top: 3px; background: var(--text); border-radius: 50%; transition: .2s;
}
input:checked + .slider { background: color-mix(in srgb, var(--primary), transparent 80%); }
input:checked + .slider:before { transform: translateX(20px); }

/* Report */
.minor-title { margin: 0 0 10px; color: var(--muted); }
.report { min-height: 120px; white-space: pre-wrap; }

/* Footer */
.footer { border-top: 1px solid var(--border); margin-top: 40px; }
.footer-inner { max-width: 1120px; margin: 0 auto; padding: 18px 20px; color: var(--muted); display: flex; align-items: center; gap: 10px; }
.footer .dot { opacity: .6; }

/* 响应式设计 */
@media (max-width: 768px) {
  .filter-group {
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
  }
  
  .date-range {
    flex-direction: column;
    gap: 8px;
  }
  
  .metrics-grid {
    grid-template-columns: 1fr;
  }
  
  .data-table {
    font-size: 12px;
  }
  
  .data-table th,
  .data-table td {
    padding: 8px 12px;
  }
  
  .template-grid {
    grid-template-columns: 1fr;
  }
  
  .upload-area {
    padding: 30px 15px;
  }
  
  .upload-actions {
    flex-direction: column;
  }
}
.kpi-trend.up::before { content: '↑ '; color: #34c759; }
.kpi-trend.down::before { content: '↓ '; color: #ff3b30; }

.panel { margin-top: 28px; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--border); }
.panel-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 16px; background: color-mix(in srgb, var(--bg), white 6%); border-bottom: 1px solid var(--border);
}
.panel-header h2 { margin: 0; font-size: 18px; }
.panel-body { padding: 16px; }

.segmented { display: inline-flex; gap: 6px; }
.seg-btn {
  border: 1px solid var(--border); background: transparent; color: var(--text);
  padding: 8px 12px; border-radius: 999px; cursor: pointer;
}
.seg-active { background: var(--bg-elev); }

.chart-placeholder {
  height: 220px; border-radius: 14px; border: 1px dashed var(--border);
  display: grid; place-items: center; color: var(--muted);
}

.form .label { display: block; margin: 8px 0 6px; color: var(--muted); }
.input, .textarea, select.input {
  width: 100%; padding: 10px 12px; border-radius: 12px; border: 1px solid var(--border);
  background: color-mix(in srgb, var(--bg), white 6%); color: var(--text);
}
.textarea { resize: vertical; font-family: inherit; }

.action {
  margin-top: 14px; padding: 10px 16px; border-radius: 12px; border: 1px solid var(--border);
  color: #fff; background: linear-gradient(180deg, #2997ff, #0071e3);
  box-shadow: 0 8px 20px rgba(41,151,255,.35); cursor: pointer;
}
.action.subtle {
  background: transparent; color: var(--text);
}

/* Toggle Switch */
.switch { position: relative; display: inline-block; width: 46px; height: 26px; }
.switch input { display: none; }
.slider {
  position: absolute; inset: 0; background: var(--bg-elev); border: 1px solid var(--border); border-radius: 999px; transition: .2s;
}
.slider:before {
  content: ""; position: absolute; height: 20px; width: 20px; left: 3px; top: 3px; background: var(--text); border-radius: 50%; transition: .2s;
}
input:checked + .slider { background: color-mix(in srgb, var(--primary), transparent 80%); }
input:checked + .slider:before { transform: translateX(20px); }

/* Report */
.minor-title { margin: 0 0 10px; color: var(--muted); }
.report { min-height: 120px; white-space: pre-wrap; }

/* Footer */
.footer { border-top: 1px solid var(--border); margin-top: 40px; }
.footer-inner { max-width: 1120px; margin: 0 auto; padding: 18px 20px; color: var(--muted); display: flex; align-items: center; gap: 10px; }
.footer .dot { opacity: .6; }

/* 响应式设计 */
@media (max-width: 768px) {
  .filter-group {
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
  }
  
  .date-range {
    flex-direction: column;
    gap: 8px;
  }
  
  .metrics-grid {
    grid-template-columns: 1fr;
  }
  
  .data-table {
    font-size: 12px;
  }
  
  .data-table th,
  .data-table td {
    padding: 8px 12px;
  }
  
  .template-grid {
    grid-template-columns: 1fr;
  }
  
  .upload-area {
    padding: 30px 15px;
  }
  
  .upload-actions {
    flex-direction: column;
  }
}
.kpi-trend.up::before { content: '↑ '; color: #34c759; }
.kpi-trend.down::before { content: '↓ '; color: #ff3b30; }

.panel { margin-top: 28px; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--border); }
.panel-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 16px; background: color-mix(in srgb, var(--bg), white 6%); border-bottom: 1px solid var(--border);
}
.panel-header h2 { margin: 0; font-size: 18px; }
.panel-body { padding: 16px; }

.segmented { display: inline-flex; gap: 6px; }
.seg-btn {
  border: 1px solid var(--border); background: transparent; color: var(--text);
  padding: 8px 12px; border-radius: 999px; cursor: pointer;
}
.seg-active { background: var(--bg-elev); }

.chart-placeholder {
  height: 220px; border-radius: 14px; border: 1px dashed var(--border);
  display: grid; place-items: center; color: var(--muted);
}

.form .label { display: block; margin: 8px 0 6px; color: var(--muted); }
.input, .textarea, select.input {
  width: 100%; padding: 10px 12px; border-radius: 12px; border: 1px solid var(--border);
  background: color-mix(in srgb, var(--bg), white 6%); color: var(--text);
}
.textarea { resize: vertical; font-family: inherit; }

.action {
  margin-top: 14px; padding: 10px 16px; border-radius: 12px; border: 1px solid var(--border);
  color: #fff; background: linear-gradient(180deg, #2997ff, #0071e3);
  box-shadow: 0 8px 20px rgba(41,151,255,.35); cursor: pointer;
}
.action.subtle {
  background: transparent; color: var(--text);
}

/* Toggle Switch */
.switch { position: relative; display: inline-block; width: 46px; height: 26px; }
.switch input { display: none; }
.slider {
  position: absolute; inset: 0; background: var(--bg-elev); border: 1px solid var(--border); border-radius: 999px; transition: .2s;
}
.slider:before {
  content: ""; position: absolute; height: 20px; width: 20px; left: 3px; top: 3px; background: var(--text); border-radius: 50%; transition: .2s;
}
input:checked + .slider { background: color-mix(in srgb, var(--primary), transparent 80%); }
input:checked + .slider:before { transform: translateX(20px); }

/* Report */
.minor-title { margin: 0 0 10px; color: var(--muted); }
.report { min-height: 120px; white-space: pre-wrap; }

/* Footer */
.footer { border-top: 1px solid var(--border); margin-top: 40px; }
.footer-inner { max-width: 1120px; margin: 0 auto; padding: 18px 20px; color: var(--muted); display: flex; align-items: center; gap: 10px; }
.footer .dot { opacity: .6; }

/* 响应式设计 */
@media (max-width: 768px) {
  .filter-group {
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
  }
  
  .date-range {
    flex-direction: column;
    gap: 8px;
  }}